#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

#include<string.h>

void solveEquation(char* equation) {
	int coefficient = 0;
	int constant = 0;
	char variable = 0;
	int sign = 1;
	int location = 1;
	int num = 0;

	while (*equation) {
		if (*equation >= '0' && *equation <= '9') {
				num = num * 10 + (*equation - '0');
			}
		else
			{
			if (*equation >= 'a' && *equation <= 'z' || *equation >= 'A' && *equation <= 'Z') {
					variable = *equation;
					coefficient += sign * location * num;
				}
			else
				{
					constant += -1 * sign * location * num;
				if (*equation == '-') {
						sign = -1;
					}
				else {
						sign = 1;
					}
				if(*equation == '='){
						location = -1;
					}
				}
				num = 0;
			}
		equation++;
	}
	if (*equation-- != variable) {
		constant += -1 * sign * location * num;
	}
	double result = (double)constant / coefficient;
	printf("%c=%.3lf\n", variable, result);
}

int main() {
	char equation[100];
	scanf("%s", equation);
	solveEquation(equation);
	return 0;
}
